package com.kry.mbs.common;

import java.io.Serializable;


public class Response<T> implements Serializable {

	private static final long serialVersionUID = 9130582032087722672L;
	
	protected int code; // 返回编码
	protected String msg; // 返回信息
	protected T result;

	public Response() {
		super();
	}

	public Response(ErrorType errorType) {
		this.code = errorType.getKey();
		this.msg = errorType.getValue();
	}

	public Response(int code, String msg, T responseBody) {
		this.code = code;
		this.msg = msg;
		this.result = responseBody;
	}


	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}


	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	
}
